from django.utils.deprecation import MiddlewareMixin


class AccessControl(MiddlewareMixin):

    def process_response(self, request, response):
        print(response)
        response['Access-Control-Allow'] = '*'
        response['Access-Control-Allow-Headers'] = '*'
        response['Access-Control-Allow-Origin'] = '*'
        response['Allow'] = 'GET, HEAD, OPTIONS, POST'
        print(response)
        return response
